package cn.com.cabinet.util;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONStreamAware;
import com.fasterxml.jackson.core.JsonGenerator;



public class JsonUtil {


	
	

	public static String parseJson(Object value) {
		
		
		try {
			String str = JSON.toJSONString(value);
			return str;
		} catch (Exception e) {
			// TODO: handle exception

			return null;
		}
	}

	public static Object JsonToList(String content, Type type) {

		try {
			
			return JSON.parseObject(content, type);
		} catch (Exception e) {
			// TODO: handle exception

			return null;
		}

	}
}
